<!-- 页头 -->
<!-- <page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
<nz-card>
  <div nz-row nzGutter="8">
    <div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
      [class.expend-options]="_$expand">
      <button nz-button nzType="primary" (click)="creat()" acl
        [acl-ability]="['USERCENTER-FREIGHT-LIST-save']">新增企业</button>
      <button nz-button nzType="primary" [nzLoading]="loadingList" (click)="st?.load(1)" acl
        [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
      <button nz-button nzType="primary" [disabled]="loadingList" (click)="exportList()" acl
        [acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button>
      <button nz-button (click)="resetSF()" [disabled]="loadingList">重置</button>
      <button nz-button nzType="link" (click)="expandToggle()">
        {{ !_$expand ? '展开' : '收起' }}
        <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
      </button>
    </div>
  </div>
</nz-card> -->
<!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" -->
<nz-card class="table-box">
  <div class="header_box">
    <label class="page_title"> <label class="driver">|</label> 企业列表</label>
    <div class="d-flex align-items-center mr-sm">
      <div class="mr-md d-flex align-items-center filter-box">
        <input nz-input placeholder="请输入企业名称" [(ngModel)]="sfValue.enterpriseName" class="com-input mr-sm" />
        <input nz-input placeholder="请输入管理员" [(ngModel)]="sfValue.contactName" class="com-input" />
      </div>
      <button nz-button nzDanger [nzLoading]="loadingList" (click)="search()" acl
        [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
      <button nz-button nzDanger  (click)="exportList()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-export']">
        导出</button>
      <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
        更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
      <nz-dropdown-menu #menu="nzDropdownMenu">
        <ul nz-menu>
          <li nz-menu-item (click)="openDrawer()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">
            高级筛选
          </li>
          <li nz-menu-item (click)="creat()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-save']">
            新增企业
          </li>
          <!-- <li nz-menu-item (click)="editPartner()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-partner']">
            修改合伙人
          </li>
          <li nz-menu-item (click)="editSale()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-sale']">
            修改渠道销售
          </li> -->
        </ul>
      </nz-dropdown-menu>
    </div>
  </div>


  <st #st [columns]="columns" [data]='service.$api_get_freight_list' [req]="{  process: beforeReq }"
    [res]="{  process: dataProcess }" [scroll]="{ x: '1200px',y:scrollY }" [page]=" {}" [loading]="loadingList">
    <ng-template st-row="score" let-item let-index="index">
      <ng-container *ngIf="item.score!==null; else billEvaluateelseTemplate">
        <nz-rate [ngModel]="item.score" nzDisabled></nz-rate>
      </ng-container>
      <ng-template #billEvaluateelseTemplate>
        <p>暂无评价</p>
      </ng-template>
    </ng-template>
    <ng-template st-row="unifiedSocialCreditCode" let-item let-index="index">
      <label [ngStyle]="{'color': item.isExpired?'#ff4d4f':''}">{{ item.unifiedSocialCreditCode }}</label><br>
      <ng-container *ngIf="item.isExpired">
        <nz-tag nzColor="#ff4d4f">已过期</nz-tag>
      </ng-container>
    </ng-template>
    <ng-template st-row="contacter" let-item let-index="index">
      <p nz-tooltip [nzTooltipTitle]="item.contacter+'/'+item.mobile" style="cursor: pointer;width: 200px;margin: 0;    white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;">
        {{item.contacter+'/'+item.mobile }}
      </p>
    </ng-template>
    <ng-template st-row="customerServiceIdLabel" let-item let-index="index">
      <p nz-tooltip [nzTooltipTitle]="item.customerServiceIdLabel" style="cursor: pointer;width: 120px;margin: 0;    white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;">
        {{ item.customerServiceIdLabel }}
      </p>
    </ng-template>
    <ng-template st-row="partnerName" let-item let-index="index">
      <p nz-tooltip [nzTooltipTitle]="item.partnerName+'/'+item.partnerMobile" style="cursor: pointer;width: 120px;margin: 0;    white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;">
        {{ item.partnerName ? item.partnerName: '--'}}/{{item.partnerMobile ? item.partnerMobile :'--'}}
      </p>
    </ng-template>
    <ng-template st-row="promotersTelephone" let-item let-index="index">
      <!-- <a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.channelName
        }}<br>{{ item.channelMobile
        || '添加' }}</a> -->
      <p nz-tooltip [nzTooltipTitle]="item.channelName+'/'+item.channelMobile" style="cursor: pointer;width: 120px;margin: 0;    white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;">
        {{ item.channelName ? item.channelName: '--'}}/{{item.channelMobile ? item.channelMobile :'--'}}
      </p>
    </ng-template>
  </st>
</nz-card>

<ng-template #promoterModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="80">
      <se [col]="1" label="手机号">
        <input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
      </se>
    </div>
  </div>
</ng-template>
<ng-template #extraTemplate>
  <div>
    <button nz-button nzType="primary" (click)="editPartner()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改合伙人
    </button>
    <button nz-button nzType="primary" (click)="editSale()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改渠道销售
    </button>
  </div>
</ng-template>